package com.cyy.common.pojo.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Data
@Schema(description = "文章发布DTO")
public class ArticlePushReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1980251721056054999L;

    @Schema(description = "id")
    @NotNull(message = "id is required")
    private Integer id;

    @Schema(description = "文章标题")
    @NotBlank(message = "title is required")
    private String title;

    @Schema(description = "文章简介")
    @NotBlank(message = "summary is required")
    private String summary;

    @Schema(description = "内容")
    @NotNull(message = "内容为空")
    private String content;

    @Schema(description = "分类id")
    @NotNull(message = "categoryId is required")
    private Integer categoryId;

    @Schema(description = "标签列表")
    @NotNull(message = "tags is required")
    private Integer[] tags;

    @Schema(description = "封面")
    private String cover;

    @Schema(description = "是否顶置(0否，1是)")
    @NotNull(message = "isTop is required")
    private Integer isTop;

    @Schema(description = "是否原创 (0原创，1转载)")
    @NotNull(message = "isTop is required")
    private Integer isOriginal;

    @Schema(description = "转载地址")
    private String reproductionUrl;


}
